Skip to content

ESQL: Fix skipping of generative ESQL tests#132390

Merged
alex-spies merged 1 commit intoelastic:mainfrom
alex-spies:fix-gen-test-skipping
Aug 4, 2025
Merged

ESQL: Fix skipping of generative ESQL tests#132390
alex-spies merged 1 commit intoelastic:mainfrom
alex-spies:fix-gen-test-skipping

Conversation

@alex-spies
Copy link
Copy Markdown
Contributor

Fix #132273

Our generative tests skip some faulty queries based on the returned error message.

The error message can sometimes be split into multiple lines with backslashes marking the line boundaries, like in the following example:

error:	
  root_cause:	
  - type: "illegal_state_exception"	
    reason: "Found 1 problem\nline 1:960: Plan [Grok[message{r}#72141,Parser[pattern=%{WORD:wuHEnnQxDWJ}\	
      \ %{WORD:language_code_long} %{WORD:color}, grok=org.elastics\nearch.grok.Grok@2a38e4e2],[color{r}#72147,\	
      \ language_code_long{r}#72148, wuHEnnQxDWJ{r}#72149]]] optimized incorrectly\	
      \ due to missing references [message{r}#72141]"	
    stack_trace: "org.elasticsearch.ElasticsearchException$1: Found 1 problem\nline\	
      \ 1:960: Plan [Grok[message{r}#72141,Parser[pattern=%{WORD:wuHEnnQxDWJ} %{WORD:language_code_long}\	
      \ %{WORD:color}, grok=org.elastics\nearch.grok.Grok@2a38e4e2],[color{r}#72147,\	
      \ language_code_long{r}#72148, wuHEnnQxDWJ{r}#72149]]] optimized incorrectly\	
      \ due to missing references [message{r}#72141]\r\n\tat org.elasticsea

This should have been skipped based on the string optimized incorrectly due to missing references, but this skip was prevented because this string was split across multiple lines.

Let's stitch the error message back together before we check if it should be ignored, so that such line splits don't prevent skips.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged backport pending Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v9.1.1 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] GenerativeIT test failing

4 participants